package com.chen.file.params;

import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author: ~龙~
 * @date: 2023/8/11 15:44
 **/
@Data
public class FileSplitUploadParam implements Serializable {

    @NotNull(message = "文件不能空")
    private MultipartFile file;

    @NotNull(message = "当前分片数不能为空, 请从0开始")
    private Integer currentChunk;

    @NotNull(message = "总分片数不能为空")
    private Integer totalChunk;

    @NotBlank(message = "文件名不能为空")
    private String fileName;

    @NotBlank(message = "文件MD5不能为空")
    private String md5;
}
